
package com.southwind.controller;


import com.southwind.service.ProviderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ProviderController {


    @Autowired
    private ProviderService providerService;


    @Value("${server.port}")
    private String port;


    @GetMapping("/index")
    public String index() {
        return port;
    }

    @GetMapping("/list")
    public String list() {
        return "list";
    }


    @GetMapping("/test1")
    public String test1(){
        providerService.test();
        return "test1";
    }

    @GetMapping("/test2")
    public String test2(){
        providerService.test();
        return "test2";
    }


    @GetMapping("/api1/demo1")
    public String demo1(){
        return "demo";
    }

    @GetMapping("/api1/demo2")
    public String demo2(){
        return "demo";
    }

    @GetMapping("/api2/demo1")
    public String demo3(){
        return "demo";
    }

    @GetMapping("/api2/demo2")
    public String demo4(){
        return "demo";
    }
}
